/*
 * Copyright (c) 2002-2003 by OpenSymphony
 * All rights reserved.
 */
package org.jackysoft.opensymphony.workflow.config;

import java.net.URL;
import java.util.Map;

import javax.annotation.Resource;

import org.jackysoft.opensymphony.workflow.FactoryException;
import org.jackysoft.opensymphony.workflow.util.DefaultVariableResolver;
import org.jackysoft.opensymphony.workflow.util.VariableResolver;
import org.jackysoft.service.WorkflowService;
import org.jackysoft.service.VariableService;
import org.springframework.stereotype.Component;


/**
 * @author Quake Wang
 * @since 2004-5-2
 * @version $Revision: 1.4 $
 * 
 **/
@Component("workflowConfiguration")
public class SpringConfiguration implements Configuration {
	// ~ Instance fields
	// ////////////////////////////////////////////////////////

	// we init this for backward compat since existing spring configs likely
	// don't specify this
	private VariableResolver variableResolver = new DefaultVariableResolver();
	
	private WorkflowService workflowService;
	private VariableService workflowVariableService;

	// ~ Methods
	// ////////////////////////////////////////////////////////////////

	

	public boolean isInitialized() {
		return false;
	}

	public boolean isModifiable(String name) {
		return false;
	}

	public String getPersistence() {
		return null;
	}

	public Map getPersistenceArgs() {
		return null;
	}

	public void setVariableResolver(VariableResolver variableResolver) {
		this.variableResolver = variableResolver;
	}

	public VariableResolver getVariableResolver() {
		return variableResolver;
	}

	public void load(URL url) throws FactoryException {

	}	

	public WorkflowService getWorkflowService() {
		return workflowService;
	}

	@Resource
	public void setWorkflowService(WorkflowService workflowService) {
		this.workflowService = workflowService;
	}

	public VariableService getWorkflowVariableService() {
		return workflowVariableService;
	}
	@Resource
	public void setWorkflowVariableService(
			VariableService workflowVariableService) {
		this.workflowVariableService = workflowVariableService;
	}

	
	
}
